﻿Imports BUS
Imports DTO
Public Class frmTHONGTINMATHANG


    Dim mhbus As MatHangBUS = New MatHangBUS
    Private Sub LoadDsMatHang()
        Dim dt As DataTable = New DataTable
        dt = mhbus.LoadMH()
        dgv_SanPham.DataSource = dt
    End Sub


    Private Sub cbb_nhanhieu_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbb_nhanhieu.SelectedIndexChanged
        Dim masp As Integer
        masp = cbb_nhanhieu.SelectedValue
        Dim spbus As New MatHangBUS
        dgv_SanPham.DataSource = spbus.LoadMH(masp)

    End Sub



    Private Sub btn_thoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_thoat.Click
        Me.Close()
    End Sub

    Private Sub GroupPanel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupPanel1.Click

    End Sub

    Private Sub frmTHONGTINMATHANG_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'DBNGKDataSet3.SANPHAM' table. You can move, or remove it, as needed.
        LoadDsMatHang()
    End Sub
End Class